package org.springsocial.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="Person")
public class Person implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 438808303833966696L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(nullable = false)
	private Integer id;
	private String name;
	@ManyToOne
    @JoinColumn(name="maritalStatus",insertable=false, updatable=false)
	private Enumeration maritalStatus;
	@ManyToOne
    @JoinColumn(name="phoneType",insertable=false, updatable=false)
	private Enumeration phoneType;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Enumeration getMaritalStatus() {
		return maritalStatus;
	}
	public void setMaritalStatus(Enumeration maritalStatus) {
		this.maritalStatus = maritalStatus;
	}
	public Enumeration getPhoneType() {
		return phoneType;
	}
	public void setPhoneType(Enumeration phoneType) {
		this.phoneType = phoneType;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
}
